package test.singleton;

public class SingletonLazy {

    private static volatile SingletonLazy singleton= null;

    private SingletonLazy() {
    }

    public static SingletonLazy getInstance(){
        if(null==singleton) {
            synchronized (SingletonLazy.class) {
                if (null == singleton) {
                    singleton = new SingletonLazy();
                }
            }
        }

        return singleton;
    }


}
